<template>
	<view class="container">
		<view class="dl">
			<view class="dt">
				<view class="line"></view>
				<view class="p">
					商品问题
				</view>
			</view>
			
			<view class="dd">
				<view class="ul">
					<view class="li" v-for="(item, index) in problem" :key="index" @click="onProblemClick(index)">
						<view class="p">
							{{item.name}}
						</view>
						
						<image v-show="currentProblem == index" src="../../../static/fanli/icon_checked.png" mode="" class="icon"></image>
					</view>
				</view>
			</view>
		</view>
		
		<view class="dl">
			<view class="dt">
				<view class="line"></view>
				<view class="p">
					问题描述（选填）
				</view>
			</view>
			
			<view class="dd">
				<textarea class="textarea" v-model="remark" placeholder="请输入您的问题描述" />
			</view>
		</view>
		
		<button class="btn" @click="onSubmitClick">
			<text>提交</text>
		</button>
	</view>
</template>

<script>
	const _ = require("@/libs/underscore/underscore-min.js")._
	
	export default {
		data() {
			return {
				id: null,
				problem: [
					{
						name: "商品价格错误",
						value: "商品价格错误"
					},
					{
						name: "商品价格不符",
						value: "商品价格不符"
					}
				],
				currentProblem: 0,
				remark: ""
			};
		},
		
		onLoad (options) {
			this.id = options.id || null
		},
		
		methods: {
			onProblemClick (index) {
				this.currentProblem = index
			},
			
			onSubmitClick () {}
		}
	}
</script>


<style>
	page{
		background: #F2F2F2;
	}
</style>

<style lang="less" scoped>
	.dl{
		
		.dt{
			display: flex;
			height: 92px;
			align-items: center;
			padding-left: 30px;
			
			.line{
				height: 30px;
				width: 4px;
				background: #FF3660;
				margin-right: 30px;
			}
			
			.p{
				font-size: 30px;
				color: #666;
			}
		}
		
		.dd{
			background: #FFFFFF;
			
			.ul{
				padding: 0 30px;
				
				.li{
					display: flex;
					height: 92px;
					align-items: center;
					justify-content: space-between;
					border-top: 1px solid #ddd;
			
					.p{
						font-size: 30px;
						color: #333;
					}
					
					.icon{
						width: 30px;
						height: 30px;
					}
					
					&:first-child{
						border-top: 0px;
					}
				}
			}
			
			.textarea{
				box-sizing: border-box;
				padding: 30px;
				font-size: 28px;
				color: #333;
			}
		}
	}
	
	.btn{
		background: #FF3660;
		display: flex;
		align-items: center;
		justify-content: center;
		border-radius: 12px;
		height: 92px;
		font-size: 30px;
		color: #FFFFFF;
		margin: 80px auto;
		width: 660px;
	}
</style>
